import request from '@/utils/request'


export function getTree(companyId,projectId) {
  return request.get('buss/safeArrangeFile/tree?companyId='+companyId+'&projectId='+projectId)
}

export function getAllCompanyById(projectId) {
  return request.get('buss/safeArrangeFile/getAllCompanyById?projectId='+projectId)
}

export function getInitSafeFile(data) {
  return request.post('buss/safeArrangeFile/getInitSafeFile', data)
}
export function getProjectCompanyTree(id) {
  return request.get('buss/safeArrangeFile/getProjectCompanyTree?id='+id)
}
export function moveFile(data) {
  return request.post('buss/safeArrangeFile/moveFile', data)
}

export function submit(data) {
  return request({
    url: 'buss/safeArrangeFile/add',
    method: 'post',
    data
  })
}
export function del(ids) {
  return request({
    url: 'buss/safeArrangeFile/del',
    method: 'post',
    data: ids
  })
}

export function resubmit(data) {
  return request({
    url: 'buss/safeArrangeFile/edit',
    method: 'post',
    data
  })
}
export default {
  getTree,
  getAllCompanyById,getInitSafeFile,getProjectCompanyTree,moveFile,
  submit,
  resubmit,
  del
}
